<template>
    <div class="main">
        <div class="mustReadBigBox">
        <!-- <span>这是书城页面</span> -->
        <!-- 书城类型切换 -->
            <div class="MRBBB">
                <div class="BCcontainer">
                    <div class="mustReadTitle">
                        <div class="Toptions">
                            <span :class="{con:mustReadType==2}" @click="mustReadType=2">男生</span>
                            <span :class="{con:mustReadType==1}" @click="mustReadType=1">女生</span>
                        </div>
                        <div class="search">
                            <!-- <router-link to="/mustRead/mustReadRankList" tag="div"><span>更多排行榜</span></router-link> -->
                            <span  @click="showShare = true"  class="iconfont icon-fenxiang FX"></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <van-share-sheet
        v-model="showShare"
        title="分享"
        :options="options"
        @select="onSelect"
        />
        <mustReadWomen v-if="mustReadType==1"></mustReadWomen>
        <mustReadMan v-if="mustReadType==2"></mustReadMan>
        <bottomNav></bottomNav>
    </div>
</template>

<script>
import bottomNav from "../../components/base/bottomNav.vue"
import mustReadWomen from "../../components/mustRead/mustReadWomen.vue";
import mustReadMan from "../../components/mustRead/mustReadMan.vue";
import Vue from 'vue';
import { ShareSheet } from 'vant';
import { Toast } from 'vant';

Vue.use(ShareSheet);
export default {
    data(){
        return{
            mustReadType:1,
            showShare: false,
            options: [
                { name: '分享到微信', icon: 'wechat' },
                { name: '分享到微博', icon: 'weibo' },
                { name: '分享到QQ', icon: 'qq' },
                { name: '分享到空间', icon: 'link' },
                { name: '复制链接', icon: 'link' },
                { name: '分享到其他', icon: 'link' },
            ],
        }
    },
    methods:{
        onSelect(option) {
            Toast(option.name);
            this.showShare = false;
        },
        
    },
    components:{
        mustReadWomen,
        mustReadMan,
        bottomNav
    }
}
</script>

<style lang="less">
@import "../../assets/css/base.css";
.mustReadBigBox{
    padding-top: 51.6px;
    width: 100%;
    background-color: #ffd831;
    .MRBBB{
        position: fixed;
        width: 100% ;
        height: 50px;
        top: 0px;
        left: 0px;
        z-index: 10;
        .BCcontainer{
            .mustReadTitle{
                width: 100%;
                height: 100%;
                line-height: 50px;
                background-color: #ffd831;
                display: flex;
                justify-content: space-between;
                align-items: center;
                .Toptions{
                    width: 30%;
                    margin-left: 20px;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    span{
                        font-size: 19px;
                        font-weight: bold;
                    }
                    span.con{
                        position: relative;
                    }
                    span.con::after{
                        position: absolute;
                        left: 6px;
                        bottom: 5px;
                        content: "";
                        display: block;
                        width: 70%;
                        height: 0px;
                        border-bottom: 5px solid rgba(255, 0, 0, 0.479);
                        border-radius: 20px;
                    }
                }
                .search{
                    margin-right: 20px;
                    display: flex;
                    align-items: center;
                    span.FX{
                        font-size: 28px;
                        font-weight: bold;
                    }
                    div{
                        padding-right: 10px;
                        span{
                            font-size: 13px;
                            border: 1px solid #666;
                            font-weight: bold;
                            padding: 5px 10px;
                            border-radius: 20px;
                        }
                    }
                }
            }
        }
    }
}
</style>